package com.ruoyi.project.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.system.mapper.SysDynamicCommentMapper;
import com.ruoyi.project.system.domain.SysDynamicComment;
import com.ruoyi.project.system.service.ISysDynamicCommentService;

/**
 * 用户动态评论Service业务层处理
 * 
 * @author jjp
 * @date 2020-04-16
 */
@Service
public class SysDynamicCommentServiceImpl implements ISysDynamicCommentService 
{
    @Autowired
    private SysDynamicCommentMapper sysDynamicCommentMapper;

    /**
     * 查询用户动态评论
     * 
     * @param commentId 用户动态评论ID
     * @return 用户动态评论
     */
    @Override
    public SysDynamicComment selectSysDynamicCommentById(Long commentId)
    {
        return sysDynamicCommentMapper.selectSysDynamicCommentById(commentId);
    }

    /**
     * 查询用户动态评论列表
     * 
     * @param sysDynamicComment 用户动态评论
     * @return 用户动态评论
     */
    @Override
    public List<SysDynamicComment> selectSysDynamicCommentList(SysDynamicComment sysDynamicComment)
    {
        return sysDynamicCommentMapper.selectSysDynamicCommentList(sysDynamicComment);
    }

    /**
     * 新增用户动态评论
     * 
     * @param sysDynamicComment 用户动态评论
     * @return 结果
     */
    @Override
    public int insertSysDynamicComment(SysDynamicComment sysDynamicComment)
    {
        return sysDynamicCommentMapper.insertSysDynamicComment(sysDynamicComment);
    }

    /**
     * 修改用户动态评论
     * 
     * @param sysDynamicComment 用户动态评论
     * @return 结果
     */
    @Override
    public int updateSysDynamicComment(SysDynamicComment sysDynamicComment)
    {
        return sysDynamicCommentMapper.updateSysDynamicComment(sysDynamicComment);
    }

    /**
     * 批量删除用户动态评论
     * 
     * @param commentIds 需要删除的用户动态评论ID
     * @return 结果
     */
    @Override
    public int deleteSysDynamicCommentByIds(Long[] commentIds)
    {
        return sysDynamicCommentMapper.deleteSysDynamicCommentByIds(commentIds);
    }

    /**
     * 删除用户动态评论信息
     * 
     * @param commentId 用户动态评论ID
     * @return 结果
     */
    @Override
    public int deleteSysDynamicCommentById(Long commentId)
    {
        return sysDynamicCommentMapper.deleteSysDynamicCommentById(commentId);
    }

    @Override
    public List<SysDynamicComment> findDynamicId(Long dynamicId) {
        return sysDynamicCommentMapper.findDynamicId(dynamicId);
    }
}
